package org.osgroup.service;

import org.osgroup.project.RollerCoaster;
import org.springframework.stereotype.Service;

import jakarta.annotation.PostConstruct;

/**
 * 激流勇进项目服务
 */
@Service
public class RollerCoasterService {
    
    private RollerCoaster rollerCoaster;
    
    @PostConstruct
    public void init() {
        // 初始化激流勇进项目
        // 水枪20个,雨衣50件,防水袋30个
        rollerCoaster = new RollerCoaster("P001", "激流勇进", 20, 50, 30);
        
        // 启动自动心跳
        rollerCoaster.startAutoHeartbeat();
        
        System.out.println("✅ 激流勇进项目服务已初始化");
    }
    
    public RollerCoaster getRollerCoaster() {
        return rollerCoaster;
    }
}
